package com.imooc.pan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.imooc.pan.entity.RPanUserFile;
import com.imooc.pan.entity.RPanUserStorage;
import com.imooc.pan.vo.UserStorageSizeVO;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

/**
* @author Janson
* @description 针对表【r_pan_user_storage(用户存储空间表)】的数据库操作Service
* @createDate 2023-07-31 09:59:39
*/
public interface RPanUserStorageService extends IService<RPanUserStorage> {
    
    UserStorageSizeVO getUserStorage();
    
    Boolean addUserStorageUsed(Long userId, String fileSizeDesc,Integer folderFlag);
    
    void substractUserStorageUsed(Long userId, List<RPanUserFile> reconds);
    Boolean isFull(Long userId,String fileSizeDesc,Integer folderFlag);
    
    void updateUserStorageSize(BigDecimal businessSize, Integer duration);
}
